How to destruct array of numbers in an object and combine to one in javascript